//
//  BusLineCell.m
//  didacar
//
//  Created by 度周末网络-王腾 on 15/12/2.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "BusLineCell.h"
#import "RegularBusLineModel.h"
#import "UILabel+Yyx.h"
#import "MainInfoTitleFields.h"

@implementation BusLineCell

- (void)awakeFromNib {
   
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

-(void)showModel:(RegularBusLineModel *)regularBusLinewModel{
    
    if (regularBusLinewModel == nil) {
        return;
    }
    
    [BaseTableViewCell setBusLineStartLocationString:regularBusLinewModel.StartStation startStationType:regularBusLinewModel.StartStationType label:self.startLocation];
    
    self.startTime.text   = regularBusLinewModel.SendTime;
    self.endLocation.text = regularBusLinewModel.EndStation;
    
    self.price.attributedText = [CommoneTools getBusLinePriceString:regularBusLinewModel.TicketPrice.stringValue isSale:regularBusLinewModel.IsSale salePrice:regularBusLinewModel.SalePrice.stringValue];
    
    self.kilometerTime.text = [NSString stringWithFormat:@"%@公里，约%@",regularBusLinewModel.Mileage.stringValue,regularBusLinewModel.UserTime];
}

@end
